@model WalkingTec.Mvvm.Demo.ViewModels.HomeVMs.IndexVM
<div class="layui-side-scroll">
    <ul class="layui-nav layui-nav-tree">
        @foreach (var item in Model.Menu)
        {
            @if (item.Url != null)
            {
                <li class="layui-nav-item">
                    <a href="javascript:;ff.LoadPage('@item.Url')">
                        @if (!string.IsNullOrEmpty(item.ICon))
                        {<img class="layui-nav-img" src="/_Framework/GetFile?id=@item.ICon">}@item.Text
                    </a>
                </li>
            }
            else
            {
                <li class="layui-nav-item">
                    <a class="" href="javascript:;">
                        @if (!string.IsNullOrEmpty(item.ICon))
                        {<img class="layui-nav-img" src="/_Framework/GetFile?id=@item.ICon">}@item.Text
                    </a>
                    <dl class="layui-nav-child">
                        @foreach (var child in item.Children)
                        {
                            <dd>
                                <a href="javascript:;ff.LoadPage('@child.Url')">
                                    @if (!string.IsNullOrEmpty(child.ICon))
                                    {<img class="layui-nav-img" src="/_Framework/GetFile?id=@child.ICon">}@child.Text
                                </a>
                            </dd>
                        }
                    </dl>
                </li>
            }
        }
    </ul>
</div>
